package com.example.daggerdemo01.views;


import android.util.Log;

import com.example.daggerdemo01.R;
import com.example.daggerdemo01.application.MyApplication;
import com.example.daggerdemo01.base.BaseActivity;
import com.example.daggerdemo01.component.DaggerAllComponent;
import com.example.daggerdemo01.database.DBHelper;
import com.example.daggerdemo01.entity.Student;
import com.example.daggerdemo01.module.DBModule;
import com.example.daggerdemo01.module.StudentModule;

import jakarta.inject.Inject;

public class InfoActivity extends BaseActivity {
    @Inject
    public Student mStudent1;

    @Inject
    public Student mStudent2;
    @Inject
    public DBHelper mDBHelper;

    @Override
    public int getLayoutId() {
        return R.layout.activity_info;
    }

    @Override
    public void init() {
        /*DaggerAllComponent
                .builder()
                .studentModule(new StudentModule())
                .dBModule(new DBModule(this))
                .build()
                .injectInfoActivity(this);*/
        ((MyApplication)getApplication()).getAllComponent().injectInfoActivity(this);
        Log.d("asdf", "Info mStudent1 hash === " + mStudent1.hashCode());
        Log.d("asdf", "Info mStudent2 hash === " + mStudent2.hashCode());
    }
}